<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Exercício 3</title>
</head>
<body>
<%
	if (request.getParameter("valor") == null) {
		out.println("Parâmetro valor não informado...");
	}
	else {
  		Integer nValor = Integer.valueOf(request.getParameter("valor")); 
%>

  		<h4>Divisores do número: <%out.println(nValor); %> </h4>
  		<table border="1" style="border-collapse:collapse">
		<% int i; 
  				for (i=1; i<=nValor; i++) {
  					if (nValor % i == 0) { 
  						out.println("<tr><td> "+ i + "</td></tr>");
  					}
  				}				 
  			%>
  		</table>
<%	
	}
%>




</body>
</html>